CalDet<TPCPadFlags>: Protect against invalid reads#14855
Merged
sawenzel merged 1 commit intoAliceO2Group:devfrom Nov 25, 2025
Merged
CalDet<TPCPadFlags>: Protect against invalid reads#14855sawenzel merged 1 commit intoAliceO2Group:devfrom
sawenzel merged 1 commit intoAliceO2Group:devfrom
Conversation
A continuation of the CalDet<TPCFlags> saga, possibly related to https://its.cern.ch/jira/browse/O2-4671 Tests on ARM, even after deployment of the custom streamer in AliceO2Group#14830, still showed segfaults in TPC digitization. With the relevant code isolated into a unit test in AliceO2Group#14850, it was possible to do a valgrind study. This showed Invalid reads to the mData of CalArray. Thereafter, putting assert statements showed that we often access CalArray<PadFlags> data slightly out of bounds - irrespective of custom streamer or not. This then either indicates a problem in the code logic or a problem with the calibration CCDB objects. This should clearly be fixed. In the meantime, this commit adds a protection against invalid accesses and returns a trivial answer as well as an error message. This is in any case better than undefined behaviour. In addition, this commit introduces possibility to switch off the custom streamer for further studies.
Contributor
|
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A continuation of the CalDet saga, possibly related to https://its.cern.ch/jira/browse/O2-4671
Tests on ARM, even after deployment of the custom streamer in #14830, still showed segfaults in TPC digitization.
With the relevant code isolated into a unit test in #14850, it was possible to do a valgrind study. This showed Invalid reads to the mData of CalArray.
Thereafter, putting assert statements showed that we often access CalArray data slightly out of bounds - irrespective of custom streamer or not. This then either indicates a problem in the code logic or a problem with the calibration CCDB objects. This should clearly be fixed.
In the meantime, this commit adds a protection against invalid accesses and returns a trivial answer as well as an error message. This is in any case better than undefined behaviour.
In addition, this commit introduces possibility to switch off the custom streamer for further studies.